package com.stars.empoly.adapter

import com.chad.library.adapter.base.viewholder.BaseDataBindingHolder
import com.stars.empoly.R
import com.stars.empoly.databinding.ItemTypeBinding
import com.stars.empoly.inte.ChoiceData
import com.stars.empoly.model.DataInfoBean
import com.trailer.base.base.BAdapter

class AllCarAdapter(val chose: ChoiceData) : BAdapter<DataInfoBean.CarTypeBean,
        BaseDataBindingHolder<ItemTypeBinding>>(R.layout.item_type) {


    override fun convert(holder: BaseDataBindingHolder<ItemTypeBinding>, item: DataInfoBean.CarTypeBean) {

        holder.dataBinding?.item = item
        holder.dataBinding?.ll!!.setOnClickListener {
           if(null!=chose){
               holder.adapterPosition
               chose.onRestuse(holder.adapterPosition.toString())
           }


        }

    }
}
